@extends('layouts.app')

@include('dashboard')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <a href="{{route('article.create')}}" class="btn-sm btn-primary pull-right" style="margin-top:7px;margin-right:7px;">发帖</a>
            <div class="panel panel-default">
                <div class="panel-heading">主版</div>
                <ul class="list-group">
                    @foreach($articles as $k => $v)
                        @if($v->exists)
                            <li class="list-group-item" style="height:40px;"><span class="badge">14</span><a href="{{route('article.article',['id' => $v->id])}}">{{$v->title}}</a></li>
                        @endif
                    @endforeach
                </ul>
            </div>
            <!-- 分页 -->
            {!! $articles->links() !!}
        </div>
    </div>
</div>
@endsection